unit U_fm_teste;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.Mask, Vcl.DBCtrls,
  Vcl.ComCtrls, Vcl.ImgList, Vcl.ToolWin, Vcl.ExtCtrls, Vcl.Buttons;

type
  Tfm_teste = class(TForm)
    pnl1: TPanel;
    tlb1: TToolBar;
    btn1: TToolButton;
    btn2: TToolButton;
    btn3: TToolButton;
    btn4: TToolButton;
    btn5: TToolButton;
    btn6: TToolButton;
    btn7: TToolButton;
    btn8: TToolButton;
    btn9: TToolButton;
    btn10: TToolButton;
    btn11: TToolButton;
    il1: TImageList;
    pgc1: TPageControl;
    ts1: TTabSheet;
    ts2: TTabSheet;
    dblkcbbID_PROJETO: TDBLookupComboBox;
    lbl1: TLabel;
    dbedt1: TDBEdit;
    lbl2: TLabel;
    dbcbb1: TDBComboBox;
    lbl3: TLabel;
    lbl4: TLabel;
    dbedt_selec: TDBEdit;
    btn12: TSpeedButton;
    lbl5: TLabel;
    lbl6: TLabel;
    dbedt3: TDBEdit;
    lbl7: TLabel;
    dbedt4: TDBEdit;
    lbl8: TLabel;
    btn13: TSpeedButton;
    dbedt_programador: TDBEdit;
    pnl2: TPanel;
    dbredt1: TDBRichEdit;
    lbl9: TLabel;
    btn14: TSpeedButton;
    dbedtDATA_AGENDAMENTO: TDBEdit;
    procedure btn13Click(Sender: TObject);
    procedure btn12Click(Sender: TObject);
    procedure btn14Click(Sender: TObject);
    procedure dbedtDATA_AGENDAMENTOKeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fm_teste: Tfm_teste;

implementation

{$R *.dfm}

uses U_fm_pequisar_programador, U_dm_principal, U_fm_pesq_checklist,
  U_fm_calendario;

procedure Tfm_teste.btn12Click(Sender: TObject);
begin
 fm_pesq_checklist:=Tfm_pesq_checklist.Create(Application);
    fm_pesq_checklist.ShowModal;
 if fm_pesq_checklist.ModalResult=mrok then
 begin
   dbedt_selec.Text:=dm_principal.cds_checklistREQUISITOS_ADICIONADOS.Text;
 end;
end;

procedure Tfm_teste.btn13Click(Sender: TObject);
begin
 fm_pesquisar_programador:=Tfm_pesquisar_programador.Create(Application);
    fm_pesquisar_programador.ShowModal;
 if fm_pesquisar_programador.ModalResult=mrok then
 begin
   dbedt_programador.Text:=dm_principal.cds_cad_programadorNOME.Text;
 end;
end;

procedure Tfm_teste.btn14Click(Sender: TObject);
begin
  fm_calendario:=Tfm_calendario.Create(Application);
  fm_calendario.ShowModal;
  dbedtDATA_AGENDAMENTO.Text:=FormatDateTime('dd/mm/yyyy',fm_calendario.MonthCalendar1.Date);
end;

procedure Tfm_teste.dbedtDATA_AGENDAMENTOKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
if Key=vk_f2 then btn14.Click;
end;

end.
